import json
from utils.img import load_gray

IMGS_prefix = "plugs\\KarDia_tou_ABel\\images\\"

name2path = json.load(open(f"{IMGS_prefix}name2path.json", "r", encoding='utf-8'))
for k in name2path.keys():
    name2path[k] = IMGS_prefix + name2path[k]
KarDia_info = {
    "resoulution":[1920,1080],
    "buttons":{"触摸继续":[535,1259]},
    "imgs":{name:load_gray(path) for name, path in name2path.items()},
    "citys":{
        "阿格莱恩":["王城莉莉托斯","莉安湖","北赛拉姆","南赛拉姆","浪人岬"],
        "克里斯汀":["纳尔本","利特利尔大区","图兰顿沙漠"]
    },
    "interfaces":{
        # 记录界面以及转跳关系，列表保存入度(图)边
        "培育室":{'农场':'培育室'},
        "农场":{
            '培育室': '农场',
            '城镇': '农场'
        },
        "城镇":{
            '农场':'出门',
            '地区':'回程',
            '商店':'离开',
            '市场':'离开',
            '协会':'离开',
            '酒馆':'离开',
            '大地图':'离开'
        },
        "地区":{
            '城镇': '探险'
        },
        "市场":{
            '城镇': '市场'
        }
    },
    "interface_buttons":{
        '魔物界面':{'强化':[958,1308],"强化素材":[[200,702],[540,702],[880,702],[200,1080],[540,1080],[880,1080],[200,1500],[540,1500],[880,1500]],"确定":[919,1662]},
        "主线关卡":{"进入":[537,1668],"初步":[214,966],"深入":[537,779],"完全":[879,959],"战阵":[987,1656],},
        "材料关卡":{"简单":[211,861],"普通":[537,845],"困难":[881,855],"兑换":[925,1800],"战阵":[979,1602],"进入":[532,1625],"离开":[114,1820]},
        "培育室":{"装填":[117,1818],"派遣":[544,1818],"农场":[1006,1753],'按品种培育':[182,1186],'短时间优先':[181,1336],'长时间优先':[188,1487],'高星级优先':[179,1639],'是':[374,1177],'1x':[544,476],'2x':[636,476], '升降序':[85,480], '星级':[228,478]},
        "农场":{"培育室":[137,1760],"出门":[962,1758],"魔物":[988,1247],"战阵":[975,1439],},
        "城镇":{"商店":[664,600],"农场":[154,1744],"探险":[969,1751],"市场":[291,763],"协会":[477,1047],"酒馆":[851,941],"大地图":[703,1316]},
        "地区":{"回程":[113,1740],"矿洞":[655,1778],"探索队":[924,1783]},
        "市场":{"炼金":[712,1784],"买蛋":[954,1788],'11连抽':[649,1246],'购买':[911,1249],'返回':[982,551],'离开':[121,1816]},
        "探索队":{"小队A":[178,486],"小队B":[511,488],"小队C":[859,484],"出发":[977,1534],"点击领取奖励":[537,899],"返回":[993,349]},
        "魔物战阵":{"阵型A":[226,389],"阵型B":[537,378],"阵型C":[853,378],"前锋A":[331,684],"前锋B":[736,693],'后卫A':[326,1120],'后卫B':[736,1139],'备守A':[202,1554],'备守B':[533,1549],'备守C':[855,1537]},
        "大地图":{"离开":[124,1807]}
    },
    "interface_key":{#用于确定当前interface的关键信息
        "农场":"管理",
        "培育室":"装填",
        "城镇":"大地图",
        "地区":"地区",
        "市场":"炼金",
    },
    "eggs":{
        "阳葵的蛋":{"time":"00:20:00","coin":True},
        "绿色史莱姆的蛋":{"time":"00:10:00","coin":True},
        "格莉姆的蛋":{"time":"00:53:00","coin":True},
        "黄金史莱姆的蛋":{"time":"09:43:20","coin":True},
        "水鸟喳喳布林的蛋":{"time":"00:40:00","coin":False},
        "风仙炭玻玻的蛋":{"time":"00:25:00","coin":False},
        "大根子的蛋":{"time":"01:00:00","coin":False},
        "斯可可的蛋":{"time":"00:30:00","coin":False}
    }
}